<?php##################################################Content Management System#################################################// Get the requested URI(address of file)$url = $REQUEST_URI ;// Rip requested URI apart via a slash as diliminator$dir = explode ("/", $url);// Convert to an array$domain = $dir[0] ;$engine = $dir[1] ;$section = $dir[2] ;$subsection = $dir[3] ;$article = $dir[4] ;//Create variables for file access to clean up code a bit$index = "/www/specials/dispatches/index.html";$section_front = "/www/specials/dispatches/$section/index.html";$subsection_front = "/www/specials/dispatches/$section/$subsection/index.html";$article_file = "/www/specials/dispatches/$section/$subsection/$article.html";$subsection_file = "/www/specials/dispatches/$section/$subsection.html";$php_file = "/www/specials/dispatches/$section/$subsection/$article.php";$header = "/www/specials/dispatches/header.php";$footer = "/www/specials/dispatches/footer.php";		$path = "/www/specials/dispatches";//Display special project homepageif(!$section)	{		$build = "index";		require($header);		include($index);		require($footer);	}//Display Section main pageelseif(!$article && !$subsection && $section && file_exists($section_front))	{		$build = "section";		require($header);		include($section_front);		require($footer);	}//Display Subsection Share Currentelseif(!$article && $subsection && $section == "share" || $section == "share")	{		require($header);		require($footer);	}//Display Subsection Share 2004elseif(!$article && $subsection && $section == "share04" || $section == "share04")	{		require($header);		require($footer);	}//Display Subsection Share 2005elseif(!$article && $subsection && $section == "share05" || $section == "share05")	{		require($header);		require($footer);	}//Display Subsection Share 2005elseif(!$article && $subsection && $section == "share06" || $section == "share05")	{		require($header);		require($footer);	}//Display Subsectionelseif(!$article && $subsection && $section && file_exists($subsection_front))	{		$build = "subsection";		require($header);		include($subsection_front);		require($footer);	}	//Display Postcardelseif($article && $subsection == "postcards" || $article && $section == "postcards")	{		require($header);		require($footer);	}//Display Postcardtestelseif($article && $subsection == "postcardstest" || $article && $section == "postcardstest")	{		require($header);		print("POSTCARD TEST");		require($footer);	}//Display Upper Articleelseif($subsection && $section && file_exists($subsection_file))	{		$build = "story";		require($header);		include($subsection_file);		require($footer);	}//Display Articleelseif($article && $subsection && $section && file_exists($article_file))	{		$build = "story";		require($header);		include($article_file);		require($footer);	}//Display Movie or articles that include php codeelseif($article && $subsection && $section && file_exists($php_file))	{		$build = "story";		require($header);		require($php_file);		require($footer);	}//None of the above, too bad 404 a'ohe page, strip email and print version options - why in the world would you want to print this page anywayelse	{		$err = "404";		$build = "story";		require($header);		print("<p><span class=\"storyHeadline\">404 - The page you are looking for is unavailable.</span><br><br><a href=\"/dispatches\" class=\"headlineLinkBold\">Go to our main page.</a></p>");		require($footer);		exit();	}?> 